<template>
  <basic-container v-loading="loading" element-loading-background="rgba(255, 255, 255, 1)">
    <div class="el-page-header haruyuki-mb-20">
      <div
        class="el-page-header__left haruyuki-flex-center haruyuki-size-18"
        @click="goBack"
      >
        <i class="el-icon-arrow-left"></i>
        <div class="haruyuki-size-16">返回</div>
      </div>
      <div class="el-page-header__content haruyuki-flex-center">
        <span class="haruyuki-ml-6">资质证件照预览</span>
      </div>
    </div>

    <imagesPreview :merchantForm="merchantForm" ref="toImagesPreview" />
  </basic-container>
</template>

<script>
import {
  getPicDetail,
  // getPicUpdateDetail,
} from "@/api/rb-merchant/posinfo/pos_info_details";

import imagesPreview from "@/components/rb-merchant/images-preview";

export default {
  components: {
    imagesPreview,
  },
  data() {
    return {
      loading: true,
      rpiNo: '',
    };
  },
  created() {
    this.rpiNo = this.$route.query.rpiNo;
    this.picDetails(this.rpiNo);
  },
  methods: {
    /* 商户资质证件图片 预览 */
    picDetails(rpiNo) {
    //   this.imageVisible = true;
      getPicDetail(rpiNo).then((res) => {
        if (res.data.code == "200") {
          this.merchantForm = res.data.data;
          this.loading = false;
        } else {
          this.$message({
            type: "error",
            message: res.data.message,
          });
        }
      });
    },
    /**
     * @func 返回页面
     * @desc 返回页面 goBack
     * */
    goBack() {
      this.$router.$avueRouter.closeTag();
      this.$router.back();
    },
  }
};
</script>

<style lang="scss" scoped>
</style>